import _default from './config'; 
import Poster from './poster';
import utils from './utils';
import collector from './collector';

function H5Collector (config) {
    
    config = config || {};
    config = utils.merge(_default(), config);

    try {
        const poster = new Poster(config);
        // 设置采集器
        collector(config, poster);
    } catch (e) {
        console.error(e);
    }
}

export default H5Collector;
